package com.springboot.cloud.demos.web.service;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.demos.entity.form.AppVersionForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

@FeignClient(name = "ribbon-consumer", fallback = AppVersionServiceFallback.class)
public interface AppVersionService {

    @RequestMapping(value = "/appVersion/list", method = RequestMethod.GET)
    Result list();

    @RequestMapping(value = "/appVersion/{id}", method = RequestMethod.GET)
    Result queryById(@PathVariable(value = "id") String id);

    @RequestMapping(value = "/appVersion", method = RequestMethod.POST)
    Result add(@RequestBody AppVersionForm appVersionForm);

    @RequestMapping(value = "/appVersion", method = RequestMethod.PUT)
    Result update(@RequestBody AppVersionForm appVersionForm);

    @RequestMapping(value = "/appVersion/{id}", method = RequestMethod.DELETE)
    Result delete(@PathVariable(value = "id") String id);
}
